/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.boxin.ims.modules.jiujiudevice.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.thinkgem.jeesite.common.persistence.BaseDao;
import com.thinkgem.jeesite.common.persistence.BaseDaoImpl;
import com.boxin.ims.modules.jiujiudevice.entity.JiuCompany;

/**
 * 设备公司DAO接口
 * 
 * @author sxh
 * @version 2018-08-15
 */
public interface JiuCompanyDao extends JiuCompanyDaoCustom, CrudRepository<JiuCompany, Long> {

	@Modifying
	@Query("delete from  JiuCompany   where id = ?1")
	public int deleteById(Long id);

	@Query("from  JiuCompany order by createTime desc")
	public List<JiuCompany> findAll();
}

/**
 * DAO自定义接口
 * 
 * @author sxh
 */
interface JiuCompanyDaoCustom extends BaseDao<JiuCompany> {

}

/**
 * DAO自定义接口实现
 * 
 * @author sxh
 */
@Component
class JiuCompanyDaoImpl extends BaseDaoImpl<JiuCompany> implements JiuCompanyDaoCustom {

}
